package aufgabe3;

/**
 * @author Johannes Riedmann
 * @author David Medenjak
 * @author Lukas Koell
 */
public class Square extends RegularPolygon {

    /**
     * Constructor
     * @param length Length of edges.
     */
    public Square(float length) {
        super(length);
    }

    /**
     * @return number of edges == 4
     */
    public int edges() {
        return 4;
    }

    /**
     * @return area of square > 0.00
     */
    public double area() {
        return length * length;
    }

    /**
     * @return perimeter of square > 0.00
     */
    public double perimeter() {
        return length * 4;
    }
}
